﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 简单工厂.War3.Interface;
using 简单工厂.War3.Service;
using 简单工厂.War3.ServiceExtend;

namespace 工厂方法模式.FactoryMethod
{
    /// <summary>
    /// 工厂类
    /// </summary>
    public class SixFactory : IFactory
    {

        public virtual IRace CreateInstance()
        {
            return new Six("大黄瓜",8888, new Undead(), new Undead(), new Human(), new NE());//一些具体业务
        }
    }

    public class SixFactoryExtend : SixFactory
    {
        public override IRace CreateInstance()
        {
            Console.WriteLine("这里是我们扩展工厂");
            return base.CreateInstance();
        }
    }
}
